![]() ![]() |
Q: How do I change the title of a menu after it has been inserted into the menu bar? A: Although the format of menu resources is defined by Inside Macintosh, there are no Toolbox calls to change the menu title. The format used to store menu titles and item names is essentially a packed string list, where the first byte is the length of the title, followed by the characters in the title, and immediately followed by the length of the first item. It would be extremely unsupportable to try to grow this data structure behind the Menu Manager's back. Fortunately, there is a safer and easier way to solve the problem.
Create a separate menu for each title. You can make the menus up on the
fly or just get them from your resource file at the start of your
program. You can then call Further Reference: Inside Macintosh: Menu Manager [Dec 22 1998] |
Developer Documentation | Technical Notes | Development Kits | Sample Code |